<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Minetest&apos;s scrollbars are janky.',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/07/03.jpg" alt="White flowers near the street" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had 69 grams of cereal and 104 grams of soy milk.
		For lunch, I had a 183-gram smoothie, and for dinner, a 247-gram one.
		I also snacked on 59 grams of pretzels.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion posts for the day:
	</p>
	<blockquote>
		<p>
			Thanks for briefly discussing Bionic!
			I hadn&apos;t heard of that before, but will probably look into it further later.
			Quick execution is good, but the aversion of corner cases is of more interest to me.
			I&apos;d love to know how it does that.
		</p>
		<p>
			You mention near the end that Android &quot;is&quot; a modified version of the Linux kernel though, which isn&apos;t true.
			Android isn&apos;t a kernel, but a full operating system.
			Instead, Android <strong>*includes*</strong> a modified version of the Linux kernel.
			I think I heard some versions of Linux use an unmodified Linux kernel too, which was made possible after some of the Android-specific parts got pulled into the main Linux kernel project.
		</p>
	</blockquote>
	<blockquote>
		<p>
			A mesh does often represent a polyhedron.
			Even the most complex structures representable as a mesh take the form of polyhedrons with a great many sides.
			However, it&apos;s worth noting that not all meshes are polyhedrons.
			For example, for our project this week, we developed a mesh for a square.
			Squares only exist in two dimensions, while a polyhedron is three-dimensional.
			Basically, any mesh that doesn&apos;t enclose a space isn&apos;t a polyhedron.
			If it&apos;s flat, it&apos;s a polygon instead, or it can even be three-dimensional but have one place where a polyhedron would have a face instead be open to allow viewing of the inside, in which case it&apos;s still not a polyhedron because it&apos;s not fully enclosed.
		</p>
		<p>
			As for not hard-coding your graphics, I can see why that could save a lot of effort down the line.
			In general, hard-coding anything you don&apos;t have to makes your code less flexible.
			It takes a little extra effort to do things the right way, but it usually pays off if the project&apos;s going to be used more than once.
		</p>
	</blockquote>
</section>
<section id="Minetest">
	<h2>Minetest</h2>
	<img src="/img/CC_BY-SA_3.0/minetest.net./weblog/2019/07/03.png" alt="A demo chest inventory with a scrollbar" class="framed-centred-image" width="1024" height="600"/>
	<p>
		I got a working form of the chain-locked box working, complete with a scrollbar so you can easily scroll through your pages of chest inventory.
		Unfortunately, the formspec scrollbars in Minetest are so janky that I&apos;m going to need to remove the scrollbar in favour of simple buttons.
		The problem is that you can&apos;t adjust the formspec a player sees based on scrollbar movement.
		Instead, you&apos;re only able to send the player an entirely new formspec, which replaces the previous one.
		When you do that though, it interrupts the player&apos;s scrollbar-dragging.
		Even if you set the new scrollbar to be at the location the user has it at, the sending of the new formspec forces the user to drop the scrollbar.
	</p>
	<p>
		Above, I set the chain-locked boxes to always have an inventory size of 99 to test the scrollbar.
		Otherwise, I&apos;d only have a single inventory slot in the chest, and the scrollbar wouldn&apos;t even show up, let alone move anything.
	</p>
</section>
<section id="biking">
	<h2>Biking</h2>
	<p>
		By the time I finally got out of the apartment for my daily bike ride, the bottle-redemption centre was closed.
		I looked up their hours online though, assuming they&apos;d probably be closed, so I didn&apos;t have to pointlessly haul a bag of bottles across town.
		Instead, I just sort of wandered the town for about thirty-five minutes.
		At least I got my exercise for the day in though.
	</p>
</section>
END
);
